package com.yeban.base.day03;

import java.util.Scanner;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/9/27
 */
public class For_work02 {

    public static void main(String[] args) {

        //提示需要输出n行金字塔
        Scanner sc = new Scanner(System.in);
        System.out.print("字母金字塔行数：");
        int n = sc.nextInt();

        for (int i = 1; i <= n; i++) {

            //输出空格
            for (int j = 1; j <= n - i; j++) {
                System.out.print(" ");
            }
            
            //输出对应的字母
            for (int k = 0; k < 2 * i - 1; k++) {
                char temp = (char)(65 + i - 1);
                System.out.print(temp);
            }

            //每循环一行，换行
            System.out.println();
        }
    }
}
